@extends('layouts.app')
@section('title','精品推荐')
@section('content')


<!-- start: Content -->
<div class="row-fluid">		
	<div class="box span12">
		<div class="box-header" data-original-title="">
			<h2><span class="break"></span>精品推荐</h2>
		</div>
		<div class="box-content">
			<span style='color:red;'>注：默认为2个推荐，最少有2个推荐，最多只能添加4个推荐，必须完成项目选择；</span>
			<table class="table table-striped" >
				<thead>
					<tr>
				  		<th style='width:10%;'>
				  			<a href="{{ URL('app/jingpin/create') }}" class='btn btn-primary'>添加</a>
				  		</th>
				  	</tr>
				  </thead>
			</table>
			<table class="table table-bordered table-hover">
			<thead>
			  	<tr>
					<th style='width:50%'>单项服务</th>
					<th style='width:8%'>简介</th>
					<th style='width:8%;'>现价(元)</th>
					<th style='width:8%;'>原价(元)</th>
					<th style='width:8%;'>操作</th>
			  	</tr>
			</thead>   
			<tbody>
				@foreach($jingpin as $jv)
					<tr>
						<td>
						@foreach($fujian as $fv)
							@if($jv->id == $fv->sid)
								<img src="{{ $fv->img }}"style='width:240px;height:133px;float:left;margin-right: 10px;'>
							@endif
						@endforeach			
						</td>
						<td class="center"  style='line-height: 60px;'>{{ $jv->commit }}</td>
						<td class="center"  style='line-height:  60px;'>{{ $jv->price }}</td>
						<td class="center" style='line-height:  60px;'>{{ $jv->is_price }}</td>
						<td class="center" style='line-height:  60px;color:red;'>推荐</td>
						<td class="center" style='text-align: center;line-height: 150px;'>
							<form action="{{ URL("app/jingpin/delete") }}" method="POST">
								{{ method_field('DELETE') }}
								{{ csrf_field() }}
								<input type="hidden" name='id' value='{{ $jv->id }}'>
								<button class="btn btn-danger" type='submit' >
									删除
								</button>	
							</form>
						</td>
					</tr>
				@endforeach
			  </tbody>
		  </table>
		</div>
	</div><!--/span-->

</div><!--/row-->
<!-- end: Content -->
@stop
